//
//  SetPushMsg.m
//  YYZB
//
//  Created by BY_R on 16/3/31.
//
//

#import "SetPushMsg.h"

@implementation SetPushMsg
-(void)pushMsg:(NSString *)pushmsg :(NSString *)usertype :(void (^)(NSArray *, NSError *))completionHanlder{
    NSString *URL = @"Common/SetIsPushMsg";
    NSDictionary *params = @{
                             @"IsPushMsg":pushmsg,
                             @"UserType":usertype
                             };
    NSString *URLString = [self formattedURLString:params method:URL sessionNeeded:YES];
    [self sendHTTPGetRequest:URLString completionHandler:^(id result, NSError *error) {
        if (error != nil) {
            completionHanlder(nil, error);
        } else {
            NSError *err;
            NSArray *items = [self unboxedValue:result error:&err];
            completionHanlder(items, err);
        }
    }];
}
@end
